package cn.kpi.service.civilass.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kpi.dao.civilass.CivilAssItemDao;
import cn.kpi.entity.civilass.CivilAssItemEntity;
import cn.kpi.service.civilass.ICivilAssItemService;

@Service
public class CivilAssItemServiceImpl  implements ICivilAssItemService{
	
	@Autowired
	private CivilAssItemDao civilAssItemDao;
	
	public int InsertCivilAssItem(CivilAssItemEntity entity)throws Exception {
		try{
			return civilAssItemDao.InsertCivilAssItem(entity);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return -1;
		}
	}
	public List<CivilAssItemEntity> GetItemListByWhere(String where)throws Exception {
		try{
			return civilAssItemDao.GetItemListByWhere(where);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return null;
		}
	}
	public int DeleteItem(Long cassitenid)throws Exception {
		try{
			return civilAssItemDao.DeleteItem(cassitenid);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return -1;
		}
	}
	public int UpdateItem(CivilAssItemEntity entity)throws Exception {
		try{
			return civilAssItemDao.UpdateItem(entity);
		}
		catch(Exception ex){
			ex.printStackTrace();
			return -1;
		}
	}
}
